package com.hollycrm.springframework.util;

import java.io.Serializable;

import net.sf.hibernate.id.UUIDHexGenerator;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class HibernateUUIDHexGeneratorProxyBean implements IdentifierGenerator {

    private static UUIDHexGenerator uuid = new UUIDHexGenerator();

    public HibernateUUIDHexGeneratorProxyBean() {
    }

    /**
     * generate
     *
     * @param serializable boolean
     * @return Serializable
     */
    public Serializable generate(boolean serializable) {
        return uuid.generate(null, null);
    }

    /**
     * generate
     *
     * @return String
     */
    public String generate() {
        return "" + generate(true);
    }

}
